package nighttest.day05;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;

public class test5_1 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("test.txt");
		FileOutputStream fos = new FileOutputStream("test_cp.txt");
		byte[] data = new byte[1000];
		int d;
		while((d = fis.read(data))!=-1) {
		    fos.write(data,0,d);
		}
		System.out.println("复制完毕!");
		fis.close();
	    fos.close();
    }
}
